﻿Imports System.Net.Sockets
Imports System.Text

Public Class Form1
    Public serverSocket As New TcpListener(8888)
    Public requestCount As Integer
    Public clientSocket As New System.Net.Sockets.TcpClient
    Public infiniteCounter As Integer
    Public networkStream As NetworkStream
    Public bytesFrom(10024) As Byte

    Private Sub PlayButton_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PlayButton.Click
        Me.Enabled = False
        MessageBox.Show("Παρακαλώ περιμένετε να βρεθεί αντίπαλος...", "Server error")
        serverSocket.Start()
        'msg("Server Started")
        clientSocket = serverSocket.AcceptTcpClient()
        'msg("Accept connection from client")
        requestCount = 0
        Form2.Show()
        Me.Hide()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Credits.Show()
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        Me.Close()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        howtoplay.Show()
    End Sub
End Class
